#ifndef SERVER_H
#define SERVER_H

#include <queue>
#include "Socket/Socket.h"
#include "Connection/Connection.h"
#include "Messages/Message.h"




#define SERVER_LISTEN_PORT				10000
#define SERVER_POLICY_PORT				843

class Server
{
private:
	
	static Server*						m_instance;

	static std::vector<Connection*>		m_connections;
	static Socket*						m_listenSocket;
	static Socket*						m_policySocket;

public:

	static bool							isActive;
	static bool							isConnectionsBusy;
	
public:
	
	Server();
	~Server();

	void								start();
	void								update();

	static Server*						getInstance();

	static void							sendPolicy(Socket* socket);
	static const std::vector<Connection*>	getConnections() {return m_connections;}
	static const Connection*				getConnection(int index) {return m_connections[index];}

	static Socket*						getListenSocket() {return m_listenSocket;}
	static Socket*						getPolicySocket() {return m_policySocket;}
};

#endif